package org.decorator.test;

import org.decorator.entity.beverage.Espresso;
import org.decorator.entity.condiment.Mocha;
import org.junit.Test;

/**
 * @author LiKun
 * @date 2021/8/10 1:49
 */
public class One {
    @Test
    public void one() {
        Mocha mocha = new Mocha();
        Mocha mocha1 = new Mocha(new Espresso());
        mocha.setBeverage(mocha1);
        System.out.println(mocha.getDescription());
        System.out.println(mocha.cost());
    }
}
